<%@page contentType="text/html; charset=utf-8" %>
<%@ include file="/commons/taglibs.jsp"%>
<%@ taglib uri="/WEB-INF/tld/pms-tag.tld" prefix="mypms" %>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title></title>
<link href="${ctx}/styles/listTable.css" rel="stylesheet" type="text/css">
<link href="${ctx}/styles/grid.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" type="text/css" href="${ctx}/scripts/div/css/window.css" />
<script language="JavaScript" type="text/javascript" src="${ctx}/scripts/public.js"></script>
<%@ include file="/commons/validation.jsp" %>
<%@ include file="/commons/dateTime.jsp" %>
<script language="JavaScript" type="text/javascript" src="${ctx}/scripts/div/common.js"></script>

<script language="JavaScript"  src="${ctx}/scripts/common/prototype.js"></script>
<script type="text/javascript">
	var condion = null; //高级查询条件

	function submitSerch1(){
	    var flag = $("search1").fireEvent("onsubmit");
	    if(!flag) return;
		var url= "${ctx}/customer_customerAction.do?method=setSearchResidentCondition";
		var pars= $('search1').serialize();
		var myAjax = new Ajax.Request(url,{method: 'post', parameters: pars, onComplete: reloadFrame});
	}

	function openSearch(){
		var url= "${ctx}/customer_customerAction.do?method=initResidentSearch";
		top.windowOpen(url, 'residentSearch', '高级查询', 500, 550,false,"houseChoose");
	}

	function reloadFrame(){
		var url = "${ctx}/customer_customerAction.do?method=searchResident";
		document.frames["residentFrame"].location = url;

	}

	function searchClear(){
		$('customerName').value = "";
		$('houseNumber').value = "";
		$('customerType').selectedIndex = 0;
	}

	var houseId ;
	var customerId ;
	function setVar(_customerId,_houseId){
		customerId = _customerId;
		houseId = _houseId;
	}
	function getHouseId(){
		return houseId;
	}
	function getCustomerId(){
		return customerId;
	}
</script>
<base target="_self">
</head>

<body onload="" onkeydown="if(event.keyCode==13)btn1_12.onclick();">
<div class="pageNav_bg">
  <table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td id="pageNav_leftimg"><img src="${ctx}/images/ico_custome_household.gif" width="46" height="47"/></td>
      <td id="navWord"><span class="page_title">居住管理</span></td>
      <td class="pageNav_right"><a href="javascript:showFull_in();"><img id="full_image"  src="${ctx}/images/ico_fullscreen.gif" border="0"/></a></td>
    </tr>
  </table>
</div>
<div class="container">
  <table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
      <td>
	 <table width="100%" border="0" cellpadding="0" cellspacing="0">
  	<tr>
      <td class="bg_search">
	  <!-----------------------------搜索1----------------------------->
	  <table  border="0" cellpadding="0" cellspacing="0" id="search01" >
        <tr>
        <form id="search1" action="${ctx}/customer_customerAction.do?method=setSearchResidentCondition" method="post" class="required-validate">
          <td class="td_search">房号：</td>
          <td class="td_search"><input name="houseNumber" type="text" class="inputtext"  size="16"></td>
<td class="td_search">入住日期：</td>
          <td colspan="3" class="td_search"><table border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td><input name="beginInDate" type="text" class="inputtext validate-date" afterInsert="beginInDateMsg" size="10" /></td>
                <td width="4">&nbsp;</td>
                <td><img id="beginInDateImageBtn" src="${ctx}/images/ico_clock.gif"  border="0" /><span id="beginInDateMsg"></span></td>
                <td width="4">&nbsp;</td>
                <td><input name="endInDate" type="text" class="inputtext validate-date" afterInsert="endInMsg" size="10" /></td>
                <td width="4">&nbsp;</td>
                <td><img id="endInDateImageBtn" src="${ctx}/images/ico_clock.gif"  border="0" /><span id="endInMsg"></span></td>
              </tr>
          </table></td>
          <td class="td_search">搬出日期：</td>
          <td colspan="2" class="td_search"><table border="0" cellspacing="0" cellpadding="0">
            <td><input name="beginOutDate" type="text" class="inputtext validate-date" afterInsert="beginOutMsg" size="10" /></td>
            <td width="4">&nbsp;</td>
              <td><img id="beginOutDateImageBtn" src="${ctx}/images/ico_clock.gif"  border="0" /><span id="beginOutMsg"></span></td>
              <td width="4">&nbsp;</td>
              <td><input name="endOutDate" type="text" class="inputtext validate-date" afterInsert="endOutMsg" size="10" /></td>
              <td width="4">&nbsp;</td>
              <td><img id="endOutDateImageBtn" src="${ctx}/images/ico_clock.gif"  border="0" /> <span id="endOutMsg"></span></td>
            </tr>
          </table></td>
          <td class="td_search"><table border="0" cellpadding="0" cellspacing="0">
              <tr>
                <td class="buttonOffLeft" id="btn1_11"></td>
                <td class="buttonOffMiddle" id="btn1_12" onclick="submitSerch1();" onblur="btn_change(1)" onMouseOver="btn_change_over(1)" onMouseOut="btn_change_out(1)"><img src="${ctx}/images/ico_searchico.gif" alt="" border="0" align="absmiddle"> 查
                  询</td>
                <td class="buttonOffRight" id="btn1_13"></td>
              </tr>
          </table></td>
          </form>
        </tr>
      </table>
	  <!-----------------------------搜索2----------------------------->

      </td>
  	</tr>
    <tr>
      <td>
          <table width="100%" border="0" cellpadding="0" cellspacing="0">

            <tr>
              <td class="bg_toolBar"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td width="40%">&nbsp;</td>
                  <td width="60%" align="right"><!--------------------------右边图标01----------------------------------->
                  </td>
                </tr>
              </table></td>
            </tr>
            <tr>
              <td valign="top">
				<iframe id="residentFrame" name="residentFrame" src="${ctx}/customer_customerAction.do?method=initResidentList" frameborder="0" border="0"  width="100%" ></iframe>
				</td>
            </tr>
          </table>

    </tr>
  </table>
</div>
</body>
<script type="text/javascript">
			//入住开始日期
              Calendar.setup(
              {
	              inputField : "beginInDate", // ID of the input field
	              ifFormat : "%Y-%m-%d", // the date format
	              button : "beginInDateImageBtn", // ID of the button
	              align          :    "Tl",           // alignment (defaults to "Bl")
			      singleClick    :    true
              }
              );
			//入住截至日期
              Calendar.setup(
              {
	              inputField : "endInDate", // ID of the input field
	              ifFormat : "%Y-%m-%d", // the date format
	              button : "endInDateImageBtn", // ID of the button
	              align          :    "Tl",           // alignment (defaults to "Bl")
			      singleClick    :    true
              }
              );
              //搬出开始日期
              Calendar.setup(
              {
	              inputField : "beginOutDate", // ID of the input field
	              ifFormat : "%Y-%m-%d", // the date format
	              button : "beginOutDateImageBtn", // ID of the button
	              align          :    "Tl",           // alignment (defaults to "Bl")
			      singleClick    :    true
              }
              );
			 //搬出截至日期
              Calendar.setup(
              {
	              inputField : "endOutDate", // ID of the input field
	              ifFormat : "%Y-%m-%d", // the date format
	              button : "endOutDateImageBtn", // ID of the button
	              align          :    "Tl",           // alignment (defaults to "Bl")
			      singleClick    :    true
              }
              );
</script>
</html>
